using System;
using System.ComponentModel.DataAnnotations;

namespace UwinEducation.Application.Dtos
{
    /// <summary>
    /// 学期DTO
    /// </summary>
    public class TermDto
    {
        /// <summary>
        /// 学期ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 学期名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 学期简称
        /// </summary>
        public string ShortName { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }
    }

    /// <summary>
    /// 创建学期DTO
    /// </summary>
    public class CreateTermDto
    {
        /// <summary>
        /// 学期名称
        /// </summary>
        [Required(ErrorMessage = "学期名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 学期简称
        /// </summary>
        [Required(ErrorMessage = "学期简称不能为空")]
        public string ShortName { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        [Required(ErrorMessage = "开始日期不能为空")]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        [Required(ErrorMessage = "结束日期不能为空")]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
    }

    /// <summary>
    /// 更新学期DTO
    /// </summary>
    public class UpdateTermDto: CreateTermDto
    {
        /// <summary>
        /// 学期ID
        /// </summary>
        public Guid Id { get; set; }
    }
} 